package com.ithailong.reconsitutionmassion.dao;

import com.ithailong.reconsitutionmassion.entity.User;
import com.ithailong.reconsitutionmassion.exception.ServicesException;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * author:hlc
 * date:2023/10/28
 *
 * @author 17930
 */

/**
 * 用户持久层接口
 *
 * @author 17930
 */
public interface UserDao {

   //按照用户名查找
   public User selectUserByUsername(String username);

   //按照邮箱查找用户
   public User selectUserByEmail(String email);

   //用户登录
   public User useLogin(String username, String password);

   public int register(User user);

   //查询所有用户
   List<User> userList(int pageNum, int pageSize,User user);

   //查询总数
   int selectTotal(User user);

   //删除用户
   boolean deleteUser(int id);

   User selectUserById(int id);
   public boolean updateUser(User user);
}
